<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
    <head>
        <meta charset="UTF-8">
        <title>二维数组</title>
    </head>
    <body>
        <?php
        $s=array("张三",20,"男");//一维数组
        

        $jsjban=array(array('name'=>"张三",'age'=>20,'sex'=>"男"),
                      array('name'=>"李四",'age'=>22,'sex'=>"男"),
                      array('name'=>"王五",'age'=>20,'sex'=>"男"),
                      array('name'=>"赵六",'age'=>20,'sex'=>"男")
        );
        
        echo "<table border='1'>";
        foreach($jsjban as $v)//循环4次
        {
           echo "<tr>"; 
           echo "<td>{$v['name']}</td>";
           echo "<td>{$v['age']}</td>";
           echo "<td>{$v['sex']}</td>";
           echo "</tr>";
        }
        echo "</table>";
        
        ?>
    </body>
</html>

